package com.gcd.gym.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.gcd.gym.model.Admin;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface LoginMapper extends BaseMapper<Admin> {

     default Admin findByPhone(String phone) {
         LambdaQueryWrapper<Admin> queryWrapper= Wrappers.lambdaQuery();
         queryWrapper.eq(Admin::getPhone, phone);
         return selectOne(queryWrapper);
     }
}
